<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::FSMachine Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_f_s_machine.html">FSMachine</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibemb_1_1_f_s_machine-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::FSMachine Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>状态机  
 <a href="classlibemb_1_1_f_s_machine.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_f_s_machine_8h_source.html">FSMachine.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for libemb::FSMachine:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classlibemb_1_1_f_s_machine.png" usemap="#libemb::FSMachine_map" alt=""/>
  <map id="libemb::FSMachine_map" name="libemb::FSMachine_map">
<area href="classlibemb_1_1_runnable.html" title="线程运行体,子类必须重写run方法." alt="libemb::Runnable" shape="rect" coords="0,0,119,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6e49950c3d324ad0810f8ed50519422b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_f_s_machine.html#a6e49950c3d324ad0810f8ed50519422b">startup</a> (int stateID)</td></tr>
<tr class="memdesc:a6e49950c3d324ad0810f8ed50519422b"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动状态机  <a href="classlibemb_1_1_f_s_machine.html#a6e49950c3d324ad0810f8ed50519422b">More...</a><br /></td></tr>
<tr class="separator:a6e49950c3d324ad0810f8ed50519422b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa40c187ddd739150c51fe38f18e718f9"><td class="memItemLeft" align="right" valign="top"><a id="aa40c187ddd739150c51fe38f18e718f9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_f_s_machine.html#aa40c187ddd739150c51fe38f18e718f9">quit</a> ()</td></tr>
<tr class="memdesc:aa40c187ddd739150c51fe38f18e718f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">退出状态机 <br /></td></tr>
<tr class="separator:aa40c187ddd739150c51fe38f18e718f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a045e7fdf44fc39bea03a99cb9e67227a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_f_s_machine.html#a045e7fdf44fc39bea03a99cb9e67227a">registerState</a> (int stateID, <a class="el" href="classlibemb_1_1_f_s_handler.html">FSHandler</a> &amp;stateHandler)</td></tr>
<tr class="memdesc:a045e7fdf44fc39bea03a99cb9e67227a"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册状态处理器  <a href="classlibemb_1_1_f_s_machine.html#a045e7fdf44fc39bea03a99cb9e67227a">More...</a><br /></td></tr>
<tr class="separator:a045e7fdf44fc39bea03a99cb9e67227a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a274aa38b674a12c7e6d1720b1b593df3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_f_s_machine.html#a274aa38b674a12c7e6d1720b1b593df3">registerListener</a> (<a class="el" href="classlibemb_1_1_f_s_listener.html">FSListener</a> &amp;listener)</td></tr>
<tr class="memdesc:a274aa38b674a12c7e6d1720b1b593df3"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册状态监听器  <a href="classlibemb_1_1_f_s_machine.html#a274aa38b674a12c7e6d1720b1b593df3">More...</a><br /></td></tr>
<tr class="separator:a274aa38b674a12c7e6d1720b1b593df3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>状态机 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a274aa38b674a12c7e6d1720b1b593df3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a274aa38b674a12c7e6d1720b1b593df3">&#9670;&nbsp;</a></span>registerListener()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libemb::FSMachine::registerListener </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_f_s_listener.html">FSListener</a> &amp;&#160;</td>
          <td class="paramname"><em>listener</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册状态监听器 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">listener</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a045e7fdf44fc39bea03a99cb9e67227a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a045e7fdf44fc39bea03a99cb9e67227a">&#9670;&nbsp;</a></span>registerState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::FSMachine::registerState </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stateID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_f_s_handler.html">FSHandler</a> &amp;&#160;</td>
          <td class="paramname"><em>stateHandler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册状态处理器 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stateID</td><td></td></tr>
    <tr><td class="paramname">stateHandler</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a6e49950c3d324ad0810f8ed50519422b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e49950c3d324ad0810f8ed50519422b">&#9670;&nbsp;</a></span>startup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::FSMachine::startup </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stateID</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>启动状态机 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stateID</td><td>初始状态 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_f_s_machine_8h_source.html">FSMachine.h</a></li>
<li>src/FSMachine.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
